﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace Model
{
    [DataContract]
    public class Member : Person
    {
        [DataMember]
        private int memberNr;
        [DataMember]
        private byte newsletter;
        [DataMember]
        private byte specialOffer;
        [DataMember]
        private string userName;


        public Member(int id, string fName, string lName, string email, string phone, int memberNr, int postalcode, string city, byte newsletter, byte specialOffer, string password)
            : base(id, fName, lName, email, phone, postalcode, city, password)
        {
            this.memberNr = memberNr;
            this.newsletter = newsletter;
            this.specialOffer = specialOffer;
        }
        public Member( string fName, string lName, string email, string phone,  byte newsletter, byte specialOffer, string password)
            : base( fName, lName, email, phone, password)
        {
            this.newsletter = newsletter;
            this.specialOffer = specialOffer;
        
        }
        public Member(int id, string fName, string lName, string email, string phone, byte newsletter, byte specialOffer, string password, int memberNr)
            : base(id, fName, lName, email, phone, password)
        {
            this.newsletter = newsletter;
            this.specialOffer = specialOffer;
            this.memberNr = memberNr;

        }
        [DataMember]
        public int MemberNr
        {
            get { return memberNr; }
            set { memberNr = value; }
        }

        [DataMember]
        public byte Newsletter
        {
            get { return newsletter; }
            set { newsletter = value; }
        }
        [DataMember]
        public byte SpecialOffer
        {
            get { return specialOffer; }
            set { specialOffer = value; }
        }
    }
}
